return (popover_parent == grab_widget || gtk_widget_is_ancestor (popover_parent, grab_widget));
}
+static void
+update_cursor (GtkWindow *toplevel,
+ GdkDevice *device,
+ GtkWidget *target)
+{
+ GdkCursor *cursor = NULL;
+
+ while (!cursor && target)
+ {
+ cursor = gtk_widget_get_cursor (target);
+ target = _gtk_widget_get_parent (target);
+ }
+
+ gdk_window_set_device_cursor (gtk_widget_get_window (GTK_WIDGET (toplevel)),
+ device, cursor);
+}
+
static GdkNotifyType
get_virtual_notify_type (GdkNotifyType notify_type)
{
case GDK_ENTER_NOTIFY:
target = _gtk_toplevel_pick (toplevel, x, y, NULL, NULL);
old_target = update_pointer_focus_state (toplevel, event, target);
+ if (event->type == GDK_MOTION_NOTIFY || event->type == GDK_ENTER_NOTIFY)
+ update_cursor (toplevel, device, target);
/* Let it take the effective pointer focus anyway, as it may change due
* to implicit grabs.